home *** CD-ROM | disk | FTP | other *** search
- Ok, here it is.
-
- Set Buffer 5
-
- Screen Open 1,640,400,8,Hires+Laced
-
-
- _REQUESTER_PROCEDURES_STARTUP:
- Dim WINSCROL$(200)
- Global WINSCROL$()
- Wind Save
- Reserve Zone 4
-
- '******************************************************************************
- *********'
- ' Subroutines and procedures start here
- '******************************************************************************
- ***********'
-
- Procedure
- RQB[PAPR,HILITE,SHADE,TXT,INFO$,BUTTONS,BTCOL,BUTTON1$,BUTTON2$,BUTTON3$,BUTTON
- $]
- Wind Open 99,160,50,40,10,2
- Scroll Off
- Paper PAPR : Pen TXT
- Clw : Curs Off
- Border 2,PAPR,HILITE
- Ink SHADE : Draw 486,51 To 486,129 : Draw 487,51 To 487,129
- Draw 169,129 To 487,129 : Box 173,53 To 482,109
- Ink HILITE : Polyline 482,54 To 482,109 To 174,109
-
- _TEXT_CENTRE:
- If Len(INFO$)<37 Then Centre INFO$ : Goto BUTTON
- A=0
- For B=37 To 1 Step -1
- If Mid$(INFO$,B,1)=" " Then A=B : B=1
- Next B
- A$=Left$(INFO$,A-1) : B=Len(INFO$)-A
- B$=Right$(INFO$,B) :4 INFO$=B$
- Centre A$ : Print
- Goto _TEXT_CENTRE
-
- BUTTON:
- On BUTTONS Goto BUTTON1,BUTTON2,BUTTON3,BUTTON4
-
- BUTTON1:
- Paper PAPR : Pen BTCOL
- A$=BUTTON1$+" " : B$=Left$(A$,8)
- Locate 30,7 : Print B$
- Ink HILITE : Box 412,112 To 481,123
- Ink SHADE : Polyline 481,113 To 481,123 To 413,123
- Set Zone 1,412,112 To 481,123 : Goto CLICK
-
- BUTTON2:
- Paper PAPR : Pen BTCOL
- A$=BUTTON1$+" " : B$=Left$(A$,8)
- Locate 30,7 : Print B$
- Ink HILITE : Box 412,112 To 481,123
- Ink SHADE : Polyline 481,113 To 481,123 To 413,123
- Set Zone 1,412,112 To 481,123
- A$=BUTTON2$+" " : B$=Left$(A$,8)
- Locate 0,7 : Print B$
- Ink HILITE : Box 173,112 To 241,123
- Ink SHADE : Polyline 241,113 To 241,123 To 174,123
- Set Zone 2,173,112 To 241,123 : Goto CLICK
-
- BUTTON3:
- Paper PAPR : Pen BTCOL
- A$=BUTTON1$+" " : B$=Left$(A$,8)
- Locate 30,7 : Print B$
- Ink HILITE : Box 412,112 To 481,123
- Ink SHADE : Polyline 481,113 To 481,123 To 413,123
- Set Zone 1,412,112 To 481,123
- A$=BUTTON2$+" " : B$=Left$(A$,8)
- Locate 0,7 : Print B$
- Ink HILITE : Box 173,112 To 241,123
- Ink SHADE : Polyline 241,113 To 241,123 To 174,123
- Set Zone 2,173,112 To 241,123
- A$=BUTTON3$+" " : B$=Left$(A$,8)
- Locate 10,7 : Print B$
- Ink HILITE : Box 252,112 To 321,123
- Ink SHADE : Polyline 321,113 To 321,123 To 253,123
- Set Zone 3,252,112 To 321,123 : Goto CLICK
-
- BUTTON4:
- Paper PAPR : Pen BTCOL
- A$=BUTTON1$+" " : B$=Left$(A$,8)
- Locate 30,7 : Print B$
- Ink HILITE : Box 412,112 To 481,123
- Ink SHADE : Polyline 481,113 To 481,123 To 413,123
- Set Zone 1,412,112 To 481,123
- A$=BUTTON2$+" " : B$=Left$(A$,8)
- Locate 0,7 : Print B$
- Ink HILITE : Box 173,112 To 241,123
- Ink SHADE : Polyline 241,113 To 241,123 To 174,123
- Set Zone 2,173,112 To 241,123
- A$=BUTTON3$+" " : B$=Left$(A$,8)
- Locate 10,7 : Print B$
- Ink HILITE : Box 252,112 To 321,123
- Ink SHADE : Polyline 321,113 To 321,123 To 253,123
- Set Zone 3,252,112 To 321,123
- A$=BUTTON4$+" " : B$=Left$(A$,8)
- Locate 20,7 : Print B$
- Ink HILITE : Box 332,112 To 401,123
- Ink SHADE : Polyline 401,113 To 401,123 To 333,123
- Set Zone 4,332,112 To 401,123 : Goto CLICK
-
- CLICK:
- K=Mouse Key : Z=Mouse Zone
- If K=0 Then Goto CLICK
- If Z=0 Then Goto CLICK
- If Z=1 Then IN$="1" : Goto OUT
- If Z=2 Then IN$="2" : Goto OUT
- If Z=3 Then IN$="3" : Goto OUT
- If Z=4 Then IN$="4"
-
- OUT:
- Scroll On
- Wind Close
- End Proc[IN$]
-
- Procedure RQI[PAPR,HILITE,SHADE,TXT,INFO$,INBAK,NTXT,INLNG]
- Do : A$=Inkey$ : If A$<>"" Then Loop
- Wind Open 99,160,50,40,10,2
- Scroll Off
- Paper PAPR : Pen TXT
- Clw : Curs Off
- Border 2,PAPR,HILITE
- Ink SHADE : Draw 486,51 To 486,129 : Draw 487,51 To 487,129
- Draw 169,129 To 487,129 : Box 173,53 To 482,109
- Ink HILITE : Polyline 482,54 To 482,109 To 174,109
- _TEXT_CENTRE:
- If Len(INFO$)<37 Then Centre INFO$ : Goto TEST
- A=0
- For B=37 To 1 Step -1
- If Mid$(INFO$,B,1)=" " Then A=B : B=1
- Next B
- A$=Left$(INFO$,A-1) : B=Len(INFO$)-A
- B$=Right$(INFO$,B) : INFO$=B$
- Centre A$ : Print
- Goto _TEXT_CENTRE
-
- TEST:
- IN$=""
- Paper INBAK : Pen NTXT
- Locate 1,5 : Print " "
- Ink SHADE : Box 182,97 To 472,106
- Ink HILITE : Polyline 472,98 To 472,106 To 183,106
- Paper INBAK : Pen HILITE : Locate 1,5 : Print "<";Cleft$;
-
- _INPUT:
- If INLNG<1 Then INLNG=1
- If INLNG>35 Then INLNG=35
- Do : A$=Inkey$ : If A$="" Then Loop
- If A$=Chr$(8) and Len(IN$)=0 Then Goto _INPUT
- If A$=Chr$(13) Then Goto OUT
- If A$=Chr$(8) Then IN$=Left$(IN$,Len(IN$)-1) : Pen HILITE : Print "
- ";Cleft$;Cleft$;"<";Cleft$; : Pen NTXT : Goto _INPUT
- If Asc(A$)<32 Then Goto _INPUT
- If Len(IN$)=INLNG Then Goto _INPUT
- IN$=IN$+A$ : Pen NTXT : Print A$; : Pen HILITE : Print "<";Cleft$; : A$="" :
- Goto _INPUT
-
- OUT:
- Scroll On
- Wind Close
- End Proc[IN$]
-
- Procedure RQS[PAPR,HILITE,SHADE,TXT,INFO$,BKGD,SELCOL,UNSELCOL,INLNG]
- Do : A$=Inkey$ : If A$<>"" Then Loop
- SC=1
- Wind Open 99,160,50,40,10,2
- Scroll Off
- Paper PAPR : Pen TXT
- Clw : Curs Off
- Border 2,PAPR,HILITE
- Ink SHADE : Draw 486,51 To 486,129 : Draw 487,51 To 487,129
- Draw 169,129 To 487,129 : Ink BKGD : Bar 174,65 To 481,108
- Ink SHADE : Box 173,53 To 482,109
- Ink HILITE : Polyline 482,54 To 482,109 To 174,109
-
- _TEXT_CENTRE:
- A=Len(INFO$) : A$=" "
- B=38-A
- A=B/2
- A$=Left$(A$,A)+INFO$+A$
- INFO$=Left$(A$,38)
- Locate 0,0 : Ink TXT,PAPR : Text 176,61,INFO$
- Ink SHADE : Draw 173,64 To 482,64
- Ink HILITE : Draw 174,63 To 482,63
-
- BUTTONS:
- Paper PAPR : Pen BTCOL
- Locate 30,7 : Print " Select "
- Ink HILITE : Box 412,112 To 481,123
- Ink SHADE : Polyline 481,113 To 481,123 To 413,123
- Set Zone 1,412,112 To 481,123
- Locate 0,7 : Print " Up "
- Ink HILITE : Box 173,112 To 241,123
- Ink SHADE : Polyline 241,113 To 241,123 To 174,123
- Set Zone 2,173,112 To 241,123
- Locate 10,7 : Print " Down "
- Ink HILITE : Box 252,112 To 321,123
- Ink SHADE : Polyline 321,113 To 321,123 To 253,123
- Set Zone 3,252,112 To 321,123
-
- Gosub DISPLAY
-
- CLICK:
- A$="" : S=0 : K=0 : Z=0
- A$=Inkey$ : S=Scancode : K=Mouse Key : Z=Mouse Zone
- If A$=Chr$(13) Then Goto OUT
- If Z=1 and K=1 Then Goto OUT
- If S=76 Then SC=SC+1 : Goto CLICK1
- If Z=2 and K=1 Then SC=SC+1 : Goto CLICK1
- If S=77 Then SC=SC-1 : Goto CLICK1
- If Z=3 and K=1 Then SC=SC-1 : Goto CLICK1
- Goto CLICK
- CLICK1:
- If SC>INLNG Then SC=INLNG
- If SC<1 Then SC=1
- Gosub DISPLAY
- Goto CLICK
-
- DISPLAY:
- A$=" "
- B$=WINSCROL$(SC)+A$
- C$=Left$(B$,38)
- Paper SELCOL : Pen BKGD : Locate 0,1 : Print C$
- If SC=INLNG Then Paper BKGD : Locate 0,2 : Print A$
- If SC+1>INLNG Then Return
- B$=WINSCROL$(SC+1)+A$
- C$=Left$(B$,38)
- Paper BKGD : Pen UNSELCOL : Locate 0,2 : Print C$
- If SC+1=INLNG Then Locate 0,3 : Print A$
- If SC+2>INLNG Then Return
- B$=WINSCROL$(SC+2)+A$
- C$=Left$(B$,38)
- Paper BKGD : Pen UNSELCOL : Locate 0,3 : Print C$
- If SC+2=INLNG Then Locate 0,4 : Print A$
- If SC+3>INLNG Then Return
- B$=WINSCROL$(SC+3)+A$
- C$=Left$(B$,38)
- Paper BKGD : Pen UNSELCOL : Locate 0,4 : Print C$
- If SC+3=INLNG Then Locate 0,5 : Print A$
- If SC+4>INLNG Then Return
- B$=WINSCROL$(SC+4)+A$
- C$=Left$(B$,38)
- Paper BKGD : Pen UNSELCOL : Locate 0,5 : Print C$
- Return
-
- OUT:
- Paper PAPR : Pen BKGD
- IN$=WINSCROL$(SC)
- Scroll On
- Wind Close
- End Proc[IN$]
-
- 'DOCs
-
- 'in order for this set of procedures to work, you must use the following
- 'commands before opening any windows
- '
- ' Dim WINSCROL$(200) Sets up the scroll procedure array
- ' Global WINSCROL$() Makes the array global so the procedure can use it
- ' Wind Save Activates the window save command to keep the
- ' display from being corrupted
- ' Reserve Zone 4 Reserves the zones for the requester buttons. You
- ' may use any zones higher than 4 for your own work
-
- 'RQB (requester with buttons)
-
- 'PAPR - main color of the requester eg $999
- 'HILITE - color of hilights on requester eg $CCC
- 'SHADE - color of shadows on requester eg $666
- 'TXT - color of info$ test printed in requester eg $FFF
- 'INFO$ - text to be printed (6 lines of 37 chars max. & it autocentres)
- 'BUTTONS - number of buttons 1 to 4 (display order [2] [3] [4] [1])
- 'BTCOL - color of the text inside the buttons eg $000
- 'BUTTON1$ - text of button 1 (up to 8 chars)
- 'BUTTON2$ - text of button 2 (up to 8 chars)
- 'BUTTON3$ - text of button 3 (up to 8 chars)
- 'BUTTON4$ - text of button 4 (up to 8 chars)
-
- 'NOTE: the example colors are what you should set your colors to with
- ' the colour1,$AAA command. The requester expects a value such
- ' as 1 or 4
-
- 'after execution the param$ will contain either "1", "2", "3" or "4"
-
- 'RQI (requester for input)
-
- 'PAPR - main color of the requester eg $999
- 'HILITE - color of hilights on requester eg $CCC
- 'SHADE - color of shadows on requester eg $666
- 'TXT - color of info$ test printed in requester eg $FFF
- 'INFO$ - text to be printed (6 lines of 37 chars max. & it autocentres)
- 'INBAK - color of background in input bar eg $000
- 'NTXT - color of text input eg $0F0
- 'INLNG - length of input text allowed (1-35)
-
- 'NOTE: the example colors are what you should set your colors to with
- ' the colour1,$AAA command. The requester expects a value such
- ' as 1 or 4
-
- 'after execution the param$ will contain the text that was entered
-
- 'RQS (requester for scrolling through a list)
-
- 'Before calling this routine, copy your data to be displayed into the
- 'winscrol$() array
-
- 'PAPR - main color of the requester eg $999
- 'HILITE - color of hilights on requester eg $CCC
- 'SHADE - color of shadows on requester eg $666
- 'TXT - color of info$ test printed in requester eg $FFF
- 'INFO$ - text to be printed (6 lines of 37 chars max. & it autocentres)
- 'BKGD - color of background fro scroll window eg $000
- 'SELCOL - color of highlighted (top) item eg $0F0
- 'UNSELCOL - color of other items in list eg $00F
- 'INLNG - number of items in winscrol$() (1-200)
-
- 'NOTE: the example colors are what you should set your colors to with
- ' the colour1,$AAA command. The requester expects a value such
- ' as 1 or 4
-
- 'after execution the param$ will contain the text from the item that
- 'was in the highlight bar
-
- I also included my other two requester procedures. If you use them in your
- programs, give credit to Giark.
-
- Well met and godspeed,
- Giark
-
-